package com.xiongwei.status;

/**
 * 不能抽奖状态
 * @author XiongWei
 * @date 2024/2/19
 */
public class NoRaffleState implements State{

    private RaffleActivity raffleActivity;

    public NoRaffleState(RaffleActivity raffleActivity) {
        this.raffleActivity = raffleActivity;
    }

    /**
     * 当前状态可以扣积分，变更为抽奖状态
     */
    @Override
    public void deductPoint() {
        System.out.println("已扣除50积分，您可以抽奖了");
        raffleActivity.setState(raffleActivity.getRaffleState());
    }

    @Override
    public Boolean raffle() {
        System.out.println("扣除积分后才能抽奖");
        return false;
    }

    @Override
    public void dispensePrize() {
        System.out.println("不能发放奖品");
    }
}
